package cn.dhnep.demo.service.impl;

import cn.dhnep.demo.mapper.AdminMapper;
import cn.dhnep.demo.mapper.HomepageMapper;
import cn.dhnep.demo.pojo.Admin;
import cn.dhnep.demo.pojo.Menu;
import cn.dhnep.demo.pojo.Notice;
import cn.dhnep.demo.pojo.User;
import cn.dhnep.demo.service.AdminService;
import cn.dhnep.demo.service.HomepageService;
import cn.dhnep.demo.util.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;



/**
 * <p>
 *  主页实现类
 * </p>
 *
 * @author dhn
 * @since 2021-08-09
 */
@Service
public class HomepageServiceImpl extends ServiceImpl<HomepageMapper, User> implements HomepageService {


    @Resource
    private HomepageMapper homepageMapper;


    @Override
    public int usercount() {
        return homepageMapper.usercount();
    }

    @Override
    public int horsemancount() {return homepageMapper.horsemancount(); }

    @Override
    public int ordercount() {return homepageMapper.ordercount(); }

    @Override
    public int merchantcount() {return homepageMapper.merchantcount(); }

    @Override
    public List<Notice> selectNotice() { return homepageMapper.selectNotice(); }

    @Override
    public List<Notice> selectPageList(Page page) { return homepageMapper.selectPageList(page);}

    @Override
    public Integer selectPageCount(Page page) { return homepageMapper.selectPageCount(page);}

    @Override
    public int onticeadd(Notice notice) { return homepageMapper.onticeadd(notice); }

    @Override
    public int onticedelete(Integer id) { return homepageMapper.onticedelete(id); }

    @Override
    public List<Map<String,Object>>usercurve() { return homepageMapper.usercurve(); }

    @Override
    public List<Map<String, Object>> horsemancurve() { return homepageMapper.horsemancurve();
    }

    @Override
    public List<Map<String, Object>> ordercurve() {
        return homepageMapper.ordercurve();
    }

    @Override
    public List<String> datacurve() { return homepageMapper.datacurve(); }

    @Override
    public List<Menu> menyList() {
        return homepageMapper.menyList();
    }
}
